I'm making a DNS changer app to learn some beginner stuff, and I can't figure out a way to change the device DNS server programmatically. I tried to search in android documentation and Googling, but I didn't found anything.
I thought of creating a local VPN that will use the chosen DNS, but I still don't know how to do it.